﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="true" CodeBehind="UserManagement.aspx.cs" Inherits="SDZJ.ManagerView.SystemManager.WebForm1" %>

<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户管理</title>
   
    <link href="../style/css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../Scripts/jquery-1.4.1-vsdoc.js"></script>
    <script type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript"  src="../../Scripts/jquery-1.5.1.min.js"></script>
     <script type="text/javascript"  src="../../Scripts/jquery-ui-1.8.11.custom.min.js"></script>
     <script type="text/javascript"  src="JS/PopWindow.js"></script>


        <style>
            input.go {width:22px;border:0;cursor:pointer;height:18px;background:url(../images/go.gif) no-repeat;}
        /* Z-index of #mask must lower than #boxes .window */
        iframe
        {
        	width:  100%;
            height:  100%;
            border:0px;
        }
       
         rowStyle
        {
            width:100%;
            height:30px	
        }
        .tdLeft
        {
            width:40%;	
            height:20px;
            text-align:right;
            vertical-align:middle;
        }
        .tdRight
        {
            width:60%;	
            height:20px;
            text-align:left;
            vertical-align:middle;
            
        }
        .textLen
        {
        	width:100px;	
        }
    </style>

    <script language="javascript" type="text/javascript">

        var prevselitem = null;
        function selectx(row)
        {
            if (prevselitem != null)
            {
                prevselitem.style.backgroundColor = '#FFFFFF';
            }
            row.style.backgroundColor = '#E0FFFF';
            prevselitem = row;

        }
        function OpenUserWindow() 
        {
            alertWin("添加用户", "<iframe src='AddNewUser.aspx' height='285' width='610' frameborder='0'></iframe>", 610, 323);
        }
        function EditUserWindow(url) {
            //EdituserInfo.aspx
            alertWin("修改用户", "<iframe src='" + url + "' height='265' width='300' frameborder='0'></iframe>", 302, 280);
        }
        function btnDelete_Click() {

        }
        function flashPage() 
        {
            __doPostBack("<%=AspNetPager1.UniqueID%>", "");
        }
        function checkvalue() {

            if ($("#UserName").val() == "") {
                alert("请输入用户名称！");
                return false;
            }
            if ($("#NickName").val() == "") {
                alert("请输入昵称！");
                return false;
            }
            if ($("#Password1").val() == "") {
                alert("请输入密码！");
                return false;
            }
            if ($("#Password2").val() == "") {
                alert("请输入确认密码！");
                return false;
            }
            if ($("#Password1").val() != $("#Password2").val()) {
                alert("两次输入的密码不一致");
                return false;
            }
            return true;
        }
        
     </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
                            </asp:ScriptManager>
    <div style="height:27px;width:100%;padding-top:2px;border:solid 2px #8db2e3;">
    <div class="set_bg">
         <asp:UpdatePanel ID="UpdatePanel3" runat="server">    
                           <ContentTemplate>
        <img src="../images/add.gif" width="51" height="23" hspace="5"  border="0" align="absmiddle" OnClick="OpenUserWindow()">
        <asp:ImageButton ID="EditUser"  width="51" height="23" hspace="5" border="0" align="absmiddle" 
                                   runat="server" ImageUrl="~/ManagerView/images/button06.gif" onclick="EditUser_Click" 
                                   />

        <asp:ImageButton  width="51" height="23" hspace="5" border="0" align="absmiddle" 
                                   runat="server" ImageUrl="~/ManagerView/images/button07.gif" 
                                   onclick="Unnamed1_Click"/>
        关键字:
        <asp:TextBox ID="searchKey" runat="server"></asp:TextBox>
        <!--
        <asp:Button ID="Search" style="width:60px;" runat="server"  Text="查询" onclick="Search_Click"/>-->
          <asp:ImageButton ID="ImageButton1" width="51" height="23" hspace="5" border="0" align="absmiddle" 
                                   runat="server" ImageUrl="~/ManagerView/images/button08.gif" OnClick="Search_Click"/>
        </ContentTemplate> 
                             </asp:UpdatePanel>
    
    </div></div>
    <div style="width:100%;height:450px;background-color:#FFFFFF">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">    
                           <ContentTemplate>
     <asp:GridView ID="gvInfo" runat="server"  CssClass="list"
            OnRowDataBound="gvInfo_RowDataBound" AutoGenerateColumns="False" 
            DataKeyNames="USERID,DISABLED,LOCKED"   AllowSorting="False" style="width:100%;height:100%"  
            border="0" cellpadding="0" cellspacing="0" 
            onselectedindexchanged="gvInfo_SelectedIndexChanged" 
                                   onselectedindexchanging="gvInfo_SelectedIndexChanging">
            <Columns>
                <asp:BoundField HeaderText="用户名" DataField="USERNAME" SortExpression="USERNAME"/>
                <asp:BoundField HeaderText="昵称" DataField="NICENAME" SortExpression="NICENAME"/>
                <asp:BoundField HeaderText="组织结构" DataField="DESCRIPTION" SortExpression="DESCRIPTION"/>
                <asp:BoundField HeaderText="注册日期" DataField="REG_DATE" SortExpression="REG_DATE"/>

                 <asp:TemplateField HeaderText="是否禁用" SortExpression="DISABLED">
                    <ItemTemplate >
                        <asp:Label ID="DISABLED" runat="server" Text='<%#ShowString(Eval("DISABLED"))%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="是否锁定" SortExpression="LOCKED">
                    <ItemTemplate  >
                        <asp:Label ID="LOCKED" runat="server" Text='<%#ShowString(Eval("LOCKED"))%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>

            <selectedrowstyle backcolor="LightCyan" />
        </asp:GridView></ContentTemplate> 
                             </asp:UpdatePanel>
    </div>
    <div class="page">
        <input type="hidden" id="txtCurrentPage" name="txtCurrentPage" runat="server" value="1"/>
          <asp:UpdatePanel ID="UpdatePanel2" runat="server">    
                           <ContentTemplate>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="20" FirstPageText="<img src=../../images/page02.gif border=0 valign=middle hspace=3>"
                        LastPageText="<img src=../../images/page04.gif border=0 valign=middle hspace=3>"
                        NextPageText="<img src=../../images/page03.gif border=0 valign=middle hspace=3>"
                        PrevPageText="<img src=../../images/page01.gif border=0 valign=middle hspace=3>"
                        ShowCustomInfoSection="Left" ShowPageIndex="False"  
            TextAfterPageIndexBox="页"  TextBeforePageIndexBox="转到"
                        AlwaysShow="True"  CustomInfoClass="pageLine" OnPageChanged="AspNetPager_PageChanged"
                        ShowPageIndexBox="Always" CustomInfoSectionWidth="" 
            Wrap="False" SubmitButtonClass="go "
                        SubmitButtonStyle="line-height:16px" SubmitButtonText=" ">
        </webdiyer:AspNetPager>
        </ContentTemplate> 
                             </asp:UpdatePanel>
    </div>

                
    </form>
</body>
</html>
